#pragma once
#include <Rz/Object.h>
#include <Rz/Collections/List.h>
#include "Node.h"
#include "MeshNode.h"
#include "CameraNode.h"
#include "Lights/LightNode.h"

namespace Rz { namespace Graphics { namespace Scene {

class RootNode :
	public Node
{
	public:
		RZ_RTTI(Rz::Graphics::Scene, RootNode);
		RZ_RTTI_IMPLEMENTS(Node);
		RZ_RTTI_END;

		RootNode();

		virtual void Add(Node* node) override;

	protected:
		void AddToMeshList(Node* node);
		void RebuildTree();

	private:
		Ptr<CameraNode>								_activeCamera;
		Collections::List<Ptr<CameraNode>>			_cameras;
		Collections::List<Ptr<Lights::LightNode>>	_lights;
		Collections::List<Ptr<MeshNode>>			_meshes;
		Math::Vector3								_ambientLightColor;
};

} } } 
